package lab04.test04;

public class myThread implements Runnable {
    int count=5,number;
    public myThread(int num){
        number=num;
        System.out.println("创建线程："+number);
    }
    @Override
    public void run() {
        while (true){
            System.out.println("线程"+number+"：计数"+count);
            if (--count==0)
                return;
        }
    }
}
